import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
	name: 'assign',
})
export class AssignPipe implements PipeTransform {
	transform(source: any, value: any): any {
		if (source instanceof Array) {
			return [...source, ...value];
		}
		return { ...source, ...value };
	}
}
